package com.elitesland.org.repo;

import com.elitesland.org.entity.OrgBuEmployeeDO;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OrgBuEmployeeRepo extends JpaRepository<OrgBuEmployeeDO, Long>, QuerydslPredicateExecutor<OrgBuEmployeeDO> {

    List<OrgBuEmployeeDO> findAllByBuId(Long buId);

    List<OrgBuEmployeeDO> findAllByBuIdIn(List<Long> buIds);

    void deleteAllByBuIdAndEmployeeIdIn(Long buId, List<Long> employeeIds);
}
